package entity;

import java.text.DecimalFormat;

/**
 * Created by gwei on 2017/5/26.
 */
public class Option {
    private int id;
    private String content;
    private int itemId;
    private int resultCount;//记录该选项有多少票
    private double percentage;//记录所占的比例
    public String getPercentage() {
        DecimalFormat df = new DecimalFormat("0.00");
        return df.format(percentage);
    }

    public void setPercentage(double percentage) {
        this.percentage = percentage;
    }

    public int getResultCount() {
        return resultCount;
    }

    public void setResultCount(int resultCount) {
        this.resultCount = resultCount;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getItemId() {
        return itemId;
    }

    public void setItemId(int itemId) {
        this.itemId = itemId;
    }
}
